//备注：拷贝代码请加上作者信息
//作者：王海涛
//邮箱：1126471088@qq.com
//版本：V1.0.0
#include "app_lwip.h"
#include <string.h>
#include <stdio.h>

#include "FreeRTOS.h"
#include "task.h"
#include "timers.h"

#include "../../BSP/ETH_BSP/lan8720a_bsp.h"
#include "../../../LwIP-2.2.1/ports/STM32F4xx/arch/sys_arch.h"
#include "client.h"


static void WHT_LWIP_Init_Task(void* pvParameters)
{
    PRINT_INFO("LAN8720A Ethernet Demo V1.0.0 \r\n");

    PRINT_INFO("实验中使用TCP协议传输数据，电脑作为TCP Server，开发板作为TCP Client\r\n");
    PRINT_INFO("本例程的IP地址均在sys_arch.h文件中修改\r\n");
    
    WHT_LWIP_Init();
    client_init();
    vTaskDelete(NULL);
}


void WHT_LWIP_Install(uint8_t task_priority)
{
    xTaskCreate(WHT_LWIP_Init_Task, "LWIP_Init_Task", 256, NULL, task_priority, NULL);
}
